<template>
	<view class="">
		<u-navbar :is-back="true" :border-bottom="false" title="自我评价" height="46" title-color="#333" :title-bold="true"
		 :title-size="36">
			<view class="navbar-right" slot="right" @click="Store">
				确认
			</view>
		</u-navbar>
		<view class="textarea_box">
			<u-input v-model="content" type="textarea"  height="300" :clearable="false"/>
			</view>
		<u-toast ref="uToast"/>
	</view>

</template>

<script>
	export default {	
		data() {
			return {
				content:"",
				id:""
			}
		},
		onLoad(options) {
			this.id=options.id
			this.resumemy(options.id)
		},
		methods: {
		async resumemy(id) {
			let params = {
				ak: this.$store.state.token,
				cmd: 'lPeople_myquery',
				para: {
					"id": id,
				}
			}
			const res = await this.$u.api.resumedata(params)
			this.content=res.Data.zwpj
		},
		async Store(){
			let $t=this
			let params = {
				ak: this.$store.state.token,
				cmd: 'lPeople_myupdate',
				para: {
					"zwpj": this.content,
					"id":this.id
				}
			}
			const res = await this.$u.api.resumexgdata(params)
			if(res.ResponseID==0){
				this.$refs.uToast.show({
					title: res.Message,
					icon:false,
					duration:800,
					callback(){
					uni.$emit('refreshData');
					uni.navigateBack({
						delta: 1
					})
					}
				})
				
			}
		}
		}
	}
</script>

<style scoped lang="scss">
	.textarea_box{
		padding: 30rpx;
	}
	.navbar-right{
		margin-right: 30rpx;
		font-size: 30rpx;
	}
</style>
